/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entities;

import java.io.Serializable;

/**
 *
 * @author Andrés Felipe
 */
public class ProductXsalesPK implements Serializable {
    private int productid;
    private int saleid;

    public ProductXsalesPK() {
    }

    public ProductXsalesPK(int productid, int saleid) {
        this.productid = productid;
        this.saleid = saleid;
    }

    public int getProductid() {
        return productid;
    }

    public void setProductid(int productid) {
        this.productid = productid;
    }

    public int getSaleid() {
        return saleid;
    }

    public void setSaleid(int saleid) {
        this.saleid = saleid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) productid;
        hash += (int) saleid;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ProductXsalesPK)) {
            return false;
        }
        ProductXsalesPK other = (ProductXsalesPK) object;
        if (this.productid != other.productid) {
            return false;
        }
        if (this.saleid != other.saleid) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entities.ProductXsalesPK[ productid=" + productid + ", saleid=" + saleid + " ]";
    }
    
}
